package org.example.com.Controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.example.com.Bean.User;
import org.example.com.service.UserService;
import org.example.com.util.JsonResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static net.sf.jsqlparser.util.validation.metadata.NamedObject.user;

@RestController
@RequestMapping("/user")
@Tag(name = "UserController",description = "这个是对user操作的用户访问接口")
public class UserController {
    @Resource
    private UserService userService;
    @PostMapping("/login")
    public JsonResult login(User user) {
        return userService.login(user);
    }
}
